package com.gxa.park.core.pojo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author mincheung
 * @since 2022-07-18
 */
@TableName("tb_order_detail")
@ApiModel(value = "OrderDetail对象", description = "")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("自增长主键id")
      @TableId(value = "od_id", type = IdType.AUTO)
    private Integer odId;

    @ApiModelProperty("外键订单  id")
    @TableField("od_order_id")
    private Integer odOrderId;

    @ApiModelProperty("外键 用户表id绑定用户，用户名如果为空则为未绑定")
    @TableField("od_user_id")
    private Integer odUserId;

    @ApiModelProperty("外键id 所属巡检员 ")
    @TableField("od_inspector_id")
    private Integer odInspectorId;

    @ApiModelProperty("驶入时间")
    @TableField("od_in_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime odInTime;

    @ApiModelProperty("停车时间 时长 秒数")
    @TableField("od_duration")
    private Long odDuration;


}
